<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css">
        .con{
            width: 400px;
            height: 400px;
            border: 1px solid #000;
            margin: 10px;
            position: relative;
        }
        .con div{
            width: 200px;
            height: 200px;
            position: absolute;
        }
        .box01{
            background-color: green;
            left: 20px;
            top: 20px;

            z-index: 10;
        }
        .box02{
            background-color: gold;
            left: 40px;
            top: 40px;
            z-index: 11;
        }
        .box03{
            background-color: pink;
            left: 60px;
            top: 60px;
        }
        .box04{
            background-color: yellowgreen;
            left: 80px;
            top: 80px;
        }
    </style>
</head>
<body>
    <div class="con">
        <div class="box01"></div>
        <div class="box02"></div>
        <div class="box03"></div>
        <div class="box04"></div>
    </div>  

</body>
</html>